home *** CD-ROM | disk | FTP | other *** search
- 100 'Investment Income ("INVINCOME")
- 110 CLS
- 120 COLOR 0,15 : PRINT "Investment Income" : COLOR 15,0
- 130 DEFDBL A-Z
- 140 DEFINT M-N
- 150 MONEYFMT$ = "$$##,###,###.##"
- 160 PRINT : PRINT
- 170 PRINT "Do not enter dollar signs or commas"
- 180 PRINT
- 190 ' Let user enter data
- 200 INPUT "Purchase price of investment: ", PV
- 210 INPUT "Value of investment at end of term: ", FV
- 220 INPUT "Desired annual rate of return (in percent): ", AY
- 230 INPUT "Total number of periods: ", NPERIODS
- 240 INPUT "Number of income receipts per year: ", NPY
- 250 INPUT "Annual interest rate (in percent): ", AR
- 260 ' Convert annual rates to periodic rates
- 270 PR = (1 + AR / 100) ^ (1 / NPY) - 1
- 280 PY = (1 + AY / 100) ^ (1 / NPY) - 1
- 290 ' Find required present value of income
- 300 VALUEINCOME = (PV * (1 + PY) ^ NPERIODS - FV) * (1 + PR) ^ -NPERIODS
- 310 ' Find required periodic income
- 320 PMT = PR * VALUEINCOME / (1 - (1 + PR) ^ -NPERIODS)
- 330 PRINT
- 340 PRINT "Required periodic income: "; USING MONEYFMT$; PMT
- 350 END